import { ref } from 'vue'
import CodeShow from './CodeShow.vue'
import { codeTextJsxNoDfc } from './codetext'
import './jsxcss.css'

export default {
  props: {
    msg: String
  },
  setup(props) {
    const count = ref(0)
    const increment = () => {
      count.value++
    }

    return () => (
      <div>
        <h2 class="title">{props.msg}</h2>
        <button type="button" onClick={increment}>count is {count.value}</button>
        <CodeShow code-text={codeTextJsxNoDfc} />
      </div>
    )
  }
}